From 41d40786b1a945fd8147f338d87429e2135aee0b Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Tue, 3 Feb 2009 16:14:33 +0100 Subject: [PATCH] Relax the check for ignoring events above the content view --- gdk/quartz/gdkevents-quartz.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 3ea4ad074a..1c3a177185 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -519,11 +519,14 @@ find_window_for_ns_event (NSEvent *nsevent, { /* The non-grabbed case. */ - /* Leave events above the window (e.g. possibly on the titlebar) - * to cocoa. + /* Ignore all events but mouse moved that might be on the title + * bar (above the content view). The reason is that otherwise + * gdk gets confused about getting e.g. button presses with no + * window (the title bar is not known to it). */ - if (*y < 0) - return NULL; + if (event_type != NSMouseMoved) + if (*y < 0) + return NULL; /* FIXME: Also need to leave resize events to cocoa somehow? */ -- 2.30.2